import { defineStore } from "pinia";
import { ref } from "vue";

/**
 * @description  导出的主题
 */
export const themeStore = defineStore("theme", () => {
    const currentTheme = ref("CyanTheme"); // 默认是白天模式
    /**@methods */
    const changTheme = (val: "light" | "dark") => {
        if(val === "dark") {
            currentTheme.value = "CyanTheme";
        } else if (val === "light") {
            currentTheme.value = "DarkTheme";
        }
    }
    return {
      currentTheme,
      changTheme,
    };
});